package net.zjitc.ChouXiang;

/**
 * @Author admin
 * @Date 2019/3/20 10:29
 */
public class Triangle extends Shape {
    double a;
    double b;
    public Triangle(double a,double b){
        this.a=a;
        this.b=b;
    }
    @Override
    public double area(){
        return (a*b)/2;
    }
    @Override
    public String getName(){
        return "长方形";
    }
    @Override
    public void output(){
        System.out.println(getName()+"的面积是："+area());
    }
}